#include "my_stdio.h"
int main()
{
    MyFILE *fp = mfopen("log.txt", "w");
    if (fp == NULL)
        return -1;
    while (2)
    {
        char *msg = "xsdw";
        mfwrite(fp, msg, strlen(msg));
        printf("%s\n", fp->outbuffer);
        sleep(1);
    }
    // char *msg = "xsdw";
    // mfwrite(fp, msg, strlen(msg));
    mfclose(fp);
}